package com.marvels.dubbo.coreservice.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.fintech.user.entity.User;
import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.dubbo.coreservice.service.AssistantUserService;

@RestController
@RequestMapping("dubbo/assistant-info/api")
public class AssistantController {
	@Autowired
	private AssistantUserService aAssistantUserService;
	
	@RequestMapping("queryByClientManagerId")
	public List<User> queryByClientManagerId(@RequestParam(value="clientManagerId") Integer clientManagerId,@RequestParam(value="start") Integer start,@RequestParam(value="limit") Integer limit){ 
		try {
			List<User> info = aAssistantUserService.queryByClientManagerId(clientManagerId,start,limit);
			return info;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error(clientManagerId+"##############",e);
			return null;
		}
	}
}
